﻿using System.Collections.Generic;

namespace com.binance.client.model.enums
{
	 

	/// <summary>
	/// created, accrual, cleared, invalid.
	/// </summary>
	public sealed class LoanOrderStates
	{

	  public static readonly LoanOrderStates CREATED = new LoanOrderStates("CREATED", InnerEnum.CREATED, "created");
	  public static readonly LoanOrderStates ACCRUAL = new LoanOrderStates("ACCRUAL", InnerEnum.ACCRUAL, "accrual");
	  public static readonly LoanOrderStates CLEARED = new LoanOrderStates("CLEARED", InnerEnum.CLEARED, "cleared");
	  public static readonly LoanOrderStates INVALID = new LoanOrderStates("INVALID", InnerEnum.INVALID, "invalid");

	  private static readonly IList<LoanOrderStates> valueList = new List<LoanOrderStates>();

	  static LoanOrderStates()
	  {
		  valueList.Add(CREATED);
		  valueList.Add(ACCRUAL);
		  valueList.Add(CLEARED);
		  valueList.Add(INVALID);
	  }

	  public enum InnerEnum
	  {
		  CREATED,
		  ACCRUAL,
		  CLEARED,
		  INVALID
	  }

	  public readonly InnerEnum innerEnumValue;
	  private readonly string nameValue;
	  private readonly int ordinalValue;
	  private static int nextOrdinal = 0;

	  private readonly string code;

	  internal LoanOrderStates(string name, InnerEnum innerEnum, string state)
	  {
		this.code = state;

		  nameValue = name;
		  ordinalValue = nextOrdinal++;
		  innerEnumValue = innerEnum;
	  }

	  public override string ToString()
	  {
		return code;
	  }

//JAVA TO C# CONVERTER NOTE: Fields cannot have the same name as methods:EnumLookup

		public static IList<LoanOrderStates> values()
		{
			return valueList;
		}

		public int ordinal()
		{
			return ordinalValue;
		}

		public static LoanOrderStates valueOf(string name)
		{
			foreach (LoanOrderStates enumInstance in LoanOrderStates.valueList)
			{
				if (enumInstance.nameValue == name)
				{
					return enumInstance;
				}
			}
			throw new System.ArgumentException(name);
		}
	}

}